<%inherit file="/base/user.html"/>
<%namespace name="jobtable" file="/components/jobstable.mako"/>

%if c.job_status not in ['all','orphaned']:
    <p> Listing of all user jobs in state '${c.job_status}', with pagination. </p>
%elif c.job_status == 'orphaned':
    <p> Listing of all of your 'orphaned' jobs. Orphaned jobs are jobs that have
    been submited to a queue you do not have access anymore. This may have happend because
    your VO membership expired or the site implemented a local policy denying you access.</p>
%else:
<p> Listing of all of your jobs. </p>
%endif

%if c.user_client_dn and (len(c.job_list[1]) >= 1):
    ${jobtable.job_table(c.user_client_dn, c.user_client_ca,c.job_list[1])}
    % if len(c.job_list[0]) >= 1:
        ${jobtable.job_table(c.user_slcs_dn, c.user_slcs_ca,c.job_list[0])}
    % endif
%else:
    % if len(c.job_list[0]) >= 1:
        ${jobtable.job_table(c.user_slcs_dn, c.user_slcs_ca,c.job_list[0])}
    % else:
        <p> Apparently you don't have any jobs in the state: '${c.job_status}' </p>
    % endif
%endif





<%def name="css()"> 
    ${parent.css()} 
    ${self.css_link('/css/yui/build/datatable/assets/skins/sam/datatable.css', 'screen')} 
    ${self.css_link('/css/yui/build/container/assets/skins/sam/container.css', 'screen')} 
</%def> 
 
<%def name="js()"> 
    ${parent.js()} 
    <script type="text/javascript" src="/js/yui/build/dragdrop/dragdrop-min.js"></script>
    <script type="text/javascript" src="/js/yui/build/element/element-min.js"></script>
    <script type="text/javascript" src="/js/yui/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="/js/yui/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="/js/yui/build/paginator/paginator-min.js"></script>
</%def> 





